package bean;

import java.io.Serializable;
import java.util.ArrayList;

import javax.persistence.*;

@Entity
@Table (name = "clientes")
public class Cliente implements Serializable {
	private static final long serialVersionUID = 1L;
	@Id
	private String cuil;
	private String RazonSocial;
	private String condicionIVA;
	@Transient
	private ArrayList<FormaDePago> formasDePago = new ArrayList<FormaDePago>();
	
	public Cliente (){}
	
	public String getCuil() {
		return cuil;
	}

	public void setCuil(String cuil) {
		this.cuil = cuil;
	}

	public String getRazonSocial() {
		return RazonSocial;
	}

	public void setRazonSocial(String razonSocial) {
		RazonSocial = razonSocial;
	}



	@Override
	public boolean equals(Object obj) {
		if (obj == null) return false;
		if (! (obj instanceof Cliente)) return false;
		Cliente temp = (Cliente) obj;
		return this.cuil.equals(temp.cuil);
	}

	@Override
	public int hashCode() {
		return super.hashCode();
	}

	public void setFormasDePago(ArrayList<FormaDePago> formasDePago) {
		this.formasDePago = formasDePago;
	}

	public ArrayList<FormaDePago> getFormasDePago() {
		return formasDePago;
	}

	public void setCondicionIVA(String condicionIVA) {
		this.condicionIVA = condicionIVA;
	}

	public String getCondicionIVA() {
		return condicionIVA;
	}

}
